package edu.sctu.zhoudie.mouth201506.day20150609;

/**
 * Created by user08 on 2015/6/9.
 */
public class PackegeDeth {
    private PeopleAppbean peopleAppbean;
    private String weijin;


    /**
     * 构造函数
     * @param peopleappbean
     * @param weijin 违禁品
     */
    public PackegeDeth(PeopleAppbean peopleappbean,String weijin){
        this.peopleAppbean = peopleappbean;
        this.weijin = weijin;
    }

    /**
     * 检查包裹
     *
     * @return
     */
    public boolean chaBaoGuo(){
        boolean is_weijin = false;
        if(peopleAppbean.isIs_packege()){
            if(weijin.contains(peopleAppbean.getPackegename())){
                is_weijin = true;
            }
        }else{
            is_weijin = false;
        }
        return is_weijin;
    }


    /**
     * 检查水
     *
     * @return
     */
    public boolean chaWater(){
        boolean is_weijin = false;
        if(peopleAppbean.isIs_water()){
            if(weijin.contains(peopleAppbean.getWatername())){
                is_weijin = true;
            }
        }else{
            is_weijin = false;
        }

        return is_weijin;
    }

}
